import request from '@/utils/request'
//题库列表
export function question(data) {

  return request({
    url: 'question',
    method: 'get',
    params: data,
    headers: {
      showLoading: true
    }
  })
}
//题库新增
export function questionCreate(data) {

  return request({
    url: 'question/create',
    method: 'post',
    data,
    headers: {
      showLoading: false
    }
  })
}
//题库详情
export function questionRead(data) {

  return request({
    url: 'question/read',
    method: 'get',
    params: data,
    headers:{
      'showLoading':true,
      'loadingTarget':'.innerLoding'
    }
  })
}

//题库编辑
export function questionUpdate(data) {
  return request({
    url: 'question/update',
    method: 'put',
    data,
    headers: {
      showLoading: false
    }
  })
}
//题库删除
export function questionDelete(data) {
  return request({
    url: 'question/delete',
    method: 'delete',
    data,
    headers: {
      showLoading: false
    }
  })
}
//修改收费状态
export function updateischarge(data) {
  return request({
    url: 'question/updateischarge',
    method: 'put',
    data,
    headers: {
      showLoading: false
    }
  })
}
